using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class zd : MonoBehaviour
{
  public float Diedtime;
  public GameObject Died;

    // Start is called before the first frame update
    private void OnTriggerEnter2D(Collider2D collision)
    {
        collision.gameObject.GetComponent<wxfj>().health -= 10;
        Destroy(gameObject, Diedtime);
    }
    // Update is called once per frame
    void OnDestroy()
    {
        Instantiate(Died, transform.position, Quaternion.identity);
    }
  }
